Xbasic

ROUND_UP Function

Syntax

Value as N = ROUND_UP(N number,N decimal_places)

Arguments

Value

The modified value

number

The initial number with decimal digits.

decimal_places

The number of significant digits to display after the decimal point.

Description

Rounds a decimal number up to the specified number of decimal places.

Discussion

The ROUND_UP() function rounds up a number with decimal places to bigger number with fewer decimal places.

Example

x = .324
? round_up(x,2)
= 0.330000
x = 0.323300
? round_up(x,3)
= 0.324000
x = 0.323300
? round(x,3)
= 0.323000

See Also